package reduce.fz.com.reduce.util.base;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * 是否需要展示引导的缓存存储工具类
 * @author lipf
 */
public class LearnPreferenceUtil {

    private static final String CONFIG_FILE_NAME = "feel_learn_cache";

    public static void saveLearnSetting( String settingName, String settingValue) {
        SharedPreferences sharedPref = ReduceApplication.getInstance().getSharedPreferences(CONFIG_FILE_NAME, Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sharedPref.edit();
        editor.putString(settingName, settingValue);
        editor.apply();
    }

    public static String getLearnSetting(String settingName, String defaultValue) {
        SharedPreferences sharedPref = ReduceApplication.getInstance().getSharedPreferences(CONFIG_FILE_NAME, Context.MODE_PRIVATE);
        return sharedPref.getString(settingName, defaultValue);
    }

}
